import { queryBoundReq, queryMaintainReq, queryGetLastTaskExecuteTimeReq } from './api'

export default {
  namespace: 'standardMap',
  state: {},
  effects: {
    // 绑定或解绑映射
    * queryBound({ params, cb }, { call, put }) {
      const res = yield call(queryBoundReq, params)
      if (cb) {
        cb(res)
      }
    },
    // 维护
    * queryMaintain({ params, cb }, { call, put }) {
      const res = yield call(queryMaintainReq, params)
      if (cb) {
        cb(res)
      }
    },
    // 获取最后检测时间
    * queryGetLastTaskExecuteTime({ params, cb }, { call, put }) {
      const res = yield call(queryGetLastTaskExecuteTimeReq, params)
      if (cb) {
        cb(res)
      }
    },
  },
  reducers: {
  },
}
